home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / pwr14k.zip / PBINSTAL.PWR < prev    next >
Text File  |  1991-05-08  |  10KB  |  241 lines

  1. Variable        PBSpace,5,74752       ;space needed for .exe modules
  2. Variable        DocSpace,6,183296      ;space needed for doc files
  3. Variable        TotSpace,6,317440      ;space needed for all
  4. Variable        CurrFore,1            ;orig screen colors
  5. Variable        CurrBack,1
  6. Variable        CurrAttr,1
  7. Variable        MonoBack,3,7          ;background color
  8. Variable        ClearMsg,76,"                                                                            "
  9. Variable        DOW,9                 ;date variables
  10. Variable        Mo,2
  11. Variable        Da,2
  12. Variable        Yr,4
  13. Variable        ClrBack,3,112
  14. Variable        MonoTitle,3,112       ;title color
  15. Variable        ClrTitle,3,116
  16. Variable        MonoInfo,3,7          ;information box
  17. Variable        ClrInfo,3,30
  18. Variable        InChar,1
  19. Variable        InString,79
  20. Variable        PBDrive,1
  21. Variable        DocDrive,1
  22. Variable        SourceDir,250          ;install modules
  23. Variable        PBDir,250              ;powerbatch directory
  24. Variable        DocDir,250              ;documentation directory
  25. Variable        DiskTot,8             ;Disk size
  26. Variable        DiskAvail,8           ;free space
  27. Variable        Work,80               ;work area
  28. ?Color          CurrFore,CurrBack,CurrAttr  ;get current colors
  29. ?Date           DOW,Mo,Da,Yr
  30. Clear
  31. ReadYN          "Do you have a color monitor? [Y/N] ",InChar
  32. Compare         InChar,"Y",,,ColorOK
  33. SetVar          ClrBack,MonoBack      ;set colors for mono
  34. SetVar          ClrTitle,MonoTitle
  35. SetVar          ClrInfo,MonoInfo
  36. Label           ColorOK
  37. Color           ClrBack               ;reset default text attribute
  38. Clear
  39. Color           ClrTitle
  40. Box1            5,1,75,6,ClrTitle     ;draw title box
  41. Center          "Installation Program",2
  42. Center          "POWERBATCH",3
  43. Center          "by",4
  44. Center          "Computing Systems Design, Inc.",5
  45. WriteAt         6,5,DOW               ;day of week
  46. GoToXY          64,5                  ;date
  47. Write           Mo
  48. Write           "/"
  49. Write           Da
  50. Write           "/"
  51. Write           Yr
  52. Color           ClrInfo
  53. Box1            1,8,80,25,ClrInfo     ;draw action box
  54. Center          "┤ Press Ctrl-Break To Terminate The Install Process ├",25
  55. WriteAt         3,9,"There are two groups of files on the PowerBatch installation disk. One"
  56. WriteAt         3,10,"group contains the modules necessary to create PowerBatch programs and"
  57. WriteAt         3,11,"one group contains documentation, examples, and informational files."
  58. WriteAt         3,13,"The modules necessary to create PowerBatch programs MUST be on your DOS"
  59. WriteAt         3,14,"search path. The other files you may locate in a directory not on your"
  60. WriteAt         3,15,"search path."
  61. Label           GetSource
  62. WriteAt         3,17,"Enter the drive letter where the PowerBatch install modules are located "
  63. ReadUpKey       InChar
  64. Write           ":"
  65. WriteAt         3,18,"Enter the directory name where the PowerBatch install modules are located"
  66. WriteAt         3,19,"Source dir: \"
  67. ReadStr         InString
  68. Concat          SourceDir,InChar,":"
  69. Length          Work,InString
  70. Compare         Work,0,,,InpOK
  71. Concat          SourceDir,"\"
  72. Label           InpOK
  73. Concat          SourceDir,InString
  74. Concat          Work,SourceDir,"\POWERMAK.EXE"
  75. Upper           Work
  76. ?FileExist      Work,GetPBDir
  77. Clear           CurrAttr
  78. Writeline       Work
  79. WriteLine       "The above specified directory does not contain the PowerBatch programs."
  80. WriteLine       "Refer to the README.1ST file included with the PowerBatch software. To view"
  81. WriteLine       "this file enter the following line and press enter"
  82. WriteLine       " "
  83. WriteLine       "    TYPE README.1ST"
  84. Halt
  85. Label           GetPBDir
  86. WriteAt         3,17,ClearMsg
  87. WriteAt         3,18,ClearMsg
  88. WriteAt         3,19,ClearMsg
  89. GotoXY          3,17
  90. Write           "Enter the drive letter where you will place the PowerBatch software "
  91. ReadUpKey       PBDrive
  92. Write           ":"
  93. WriteAt         3,18,"Enter a directory name on the DOS search path to place PowerBatch compiler"
  94. WriteAt         3,19,"Dir > \"
  95. ReadStr         InString
  96. Upper           InString
  97. Concat          PBDir,PBDrive,":\"
  98. Concat          PBDir,InString
  99. ?InPath         PBDir,,NotInPath      ;is this on the path
  100. ?DiskSpace      PBDir,DiskTot,DiskAvail
  101. Compare         DiskAvail,PBSpace,PBDirOK,NoPathSpace,PBDirOK
  102. Label           NotInPath
  103. GoToXy          3,23
  104. Write           "Directory not on your DOS path...Re-enter"
  105. Goto            ClrMsg
  106. Label           NoPathSpace
  107. GoToXY          3,23
  108. Write            "Insufficient disk space. 73k required"
  109. Label           ClrMsg
  110. Beep            750,8                 ;alert user to error
  111. Wait            35                    ;read the message
  112. GoToXY          3,23
  113. Write           ClearMsg
  114. WriteAt         3,17,ClearMsg
  115. WriteAt         3,19,ClearMsg
  116. GoTo            GetPBDir
  117. Label           PBDirOK
  118. WriteAt         3,17,ClearMsg
  119. WriteAt         3,18,ClearMsg
  120. WriteAt         3,19,ClearMsg
  121. WriteAt         3,17,"Enter the drive letter to receive the PowerBatch information files "
  122. ReadUpKey       DocDrive
  123. Write           ":"
  124. WriteAt         3,18,"Enter a directory name to receive the PowerBatch information files"
  125. WriteAt         3,19,"Dir > \"
  126. ReadStr         InString
  127. Upper           InString
  128. Concat          DocDir,DocDrive,":\"
  129. Concat          DocDir,InString
  130. ?DirExist       DocDir,ChkDocSp
  131. GoToXY          3,23
  132. ReadYN          "Directory does not exist...Shall I create it for you [Y/N] ",InChar
  133. Beep            750,8
  134. GoToXY          3,23
  135. Write           ClearMsg
  136. Compare         InChar,"Y",,,MakDocDir
  137. WriteAt         3,19,ClearMsg
  138. WriteAt         65,17," "
  139. GoTo            PBDirOK
  140. Label           MakDocDir
  141. MD              DocDir
  142. ?DirExist       DocDir,,NoDir
  143. Label           ChkDocSp
  144. ?DiskSpace      DocDrive,DiskTot,DiskAvail
  145. Compare         DocDrive,PBDrive,,,SameDrive
  146. Compare         DiskAvail,DocSpace,BeginCopy,NoDocSpace,BeginCopy
  147. Label           SameDrive
  148. Compare         DiskAvail,TotSpace,BeginCopy,,BeginCopy
  149. WriteAt         3,23,"Insufficient disk space. 316k required."
  150. Goto            Clear2
  151. Label           NoDocSpace
  152. WriteAt         3,23,"Insufficient disk space. 179k required."
  153. Goto            Clear2
  154. label           NoDir
  155. WriteAt         3,23,"Cannot add "
  156. Write           DocDir
  157. Label           Clear2
  158. Beep            750,8
  159. Wait            35
  160. WriteAt         3,23,ClearMsg
  161. GoTo            PBDirOK
  162. Label           BeginCopy
  163. ClearBox        1,8,80,25,ClrInfo
  164. WriteAt         3,9,"Transferring SMLMODEL.MDL to "
  165. Write           PBDir
  166. Concat          Work,SourceDir,"SMLMODEL.MDL"
  167. COPY            Work, PBDir ">nul"
  168. Compare         DosError,0,CopyError,CopyError
  169. WriteAt         3,10,"Transferring POWERMAK, PBDELETE, & BONUS to "
  170. Write           PBDir
  171. Concat            Work,SourceDir,"POWERMAK.EXE"
  172. COPY            Work, PBDir ">nul"
  173. Concat            Work,SourceDir,"DELETEPB.EXE"
  174. COPY            Work, PBDir ">nul"
  175. Concat            Work,SourceDir,"BONUS.EXE"
  176. COPY            Work, PBDir ">nul"
  177. Compare         DosError,0,CopyError,CopyError
  178. WriteAt         3,11,"Transferring POWERBAT.DOC to "
  179. Write           DocDir
  180. Concat          Work,SourceDir,"POWERBAT.DOC"
  181. COPY            Work, DocDir ">nul"
  182. Compare         DosError,0,CopyError,CopyError
  183. WriteAt         3,12,"Transferring Examples to "
  184. Write           DocDir
  185. Concat            Work,SourceDir,"EXAMPLES.EXE"
  186. COPY            Work, DocDir ">nul"
  187. Compare         DosError,0,CopyError,CopyError
  188. WriteAt         3,13,"Transferring information files to "
  189. Write           DocDir
  190. Concat          Work,SourceDir,"*.FRM"
  191. COPY            Work, DocDir ">nul"
  192. Compare         DosError,0,CopyError,CopyError
  193. Concat          Work,SourceDir,"REGISTER.EXE"
  194. ?FileExist      Work,,Finis
  195. WriteAt         3,14,"You have purchased a registered copy of PowerBatch..."
  196. WriteAt         3,15,"Registering this copy to you."
  197. Wait            3
  198. CD              SourceDir
  199. Register        PBDir
  200. Label           Finis
  201. WriteAt         3,14,"This PowerBatch installation (performed by a compiled PowerBatch program)"
  202. WriteAt         3,15,"is now complete."
  203. Wait            50
  204. Color           CurrAttr
  205. Clear
  206. WriteLine       "If you give an evaluation copy of PowerBatch to a friend, it MUST contain all"
  207. WriteLine       "of the PowerBatch files without modification. The complete list of files in"
  208. WriteLine       "the evaluation system contains:"
  209. WriteLine       "      1) README.1ST      Initial start-up instructions"
  210. WriteLine       "      2) PBINSTAL.EXE    PowerBatch install program"
  211. WriteLine       "      3) POWERMAK.EXE    PowerBatch compiler"
  212. WriteLine       "      4) SMLMODEL.MDL    PowerBatch routines"
  213. WriteLine       "      5) POWERBAT.DOC    PowerBatch documentation"
  214. WriteLine       "      6) DOSEX1.BAT      Sample DOS batch file"
  215. WriteLine       "      7) DEMO1.PWR       Example PowerBatch Source file"
  216. WriteLine       "      8) MENU1.PWR       Example PowerBatch Source file"
  217. WriteLine       "      9) MOVE1.PWR       Example PowerBatch Source file"
  218. WriteLine       "     10) MOVE2.PWR       Example PowerBatch Source file"
  219. WriteLine       "     11) BOXDEMO1.PWR    Example PowerBatch Source file"
  220. WriteLine       "     12) PBINSTAL.PWR    Source for PowerBatch install"
  221. WriteLine       "     13) PBCLONE.PWR     Source for cloning PowerBatch"
  222. WriteLine       "     14) MOVESUB.PWR     Subroutine used by PBCLONE"
  223. WriteLine       "     15) DELETEPB.EXE    Delete all PowerBatch files"
  224. WriteLine       "     16) REGISTER.FRM    Registration form"
  225. WriteLine       "     17) INVOICE.FRM     Pre-printed invoice for company use"
  226. WriteLine       "     18) VENDOR.DOC      Information for software vendors"
  227. WriteLine       "     19) SYSOP.DOC       Information for BBS SysOps"
  228. WriteLine        "     20) KEYID.EXE       Utility to show key values"
  229. Concat          Work,SourceDir,"REGISTER.EXE"
  230. ?FileExist      Work,,NoRegMsg
  231. WriteLine       "DO NOT FURNISH THE PROGRAM    REGISTER.EXE  !!!"
  232. WriteLine       "THIS PROGRAM REGISTERS THE SOFTWARE IN YOUR NAME ONLY !!!"
  233. Label           NoRegMsg
  234. Halt            0
  235. Label           CopyError
  236. Concat          Work,"DOS error code ",DosError
  237. Concat          Work," occurred during copy. Cannot continue."
  238. WriteLine       3,14,Work
  239. Beep            800,8,3
  240. WriteLine       3,15,"PowerBatch installation not successful!"
  241.